package com.lcg.springboot.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.Date;

@Data
public class User {

    private  String name;

    @JsonIgnore//返回前端不显示
    private  String password;
    private Integer age;
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss" ,locale = "zh" ,timezone = "GMT+8")
    private Date birthday;
    @JsonInclude( JsonInclude.Include.NON_NULL) //当字段为空时，不显示该字段
    private String desc;


}
